<template>
  <el-container class="home-container" direction="vertical">
    <!-- 首页头部 -->
    <conta-header />
    <!-- 首页内容区 -->
    <el-container>
      <!-- 侧边栏 -->
      <conta-aside :menulist="menulist" />
      <conta-main />
    </el-container>
  </el-container>
</template>

<script>
import ContaHeader from './childComps/ContaHeader'
import ContaAside from './childComps/ContaAside'
import ContaMain from './childComps/ContaMain'

import { getMenuListData } from 'network/home.js'

export default {
  name: 'Home',
  components: {
    ContaHeader,
    ContaAside,
    ContaMain
  },
  created() {
    this.getMenuList()
  },
  data() {
    return {
      menulist: []
    }
  },
  methods: {
    async getMenuList() {
      const { data: res } = await getMenuListData()
      // console.log(data);
      // console.log(res);
      if(res.meta.status != 200) return this.$Message.error(res.meta.msg)
      this.menulist = res.data
      // console.log(this.menulist);
    }
  },
}
</script>

<style lang="less" scoped>
.home-container {
  height: 100%;
}


</style>